<@t.header>
<link rel="stylesheet" href="${request.contextPath}/app/bid/css/bid-create.css">
</@t.header> <@t.body>
<!--  -->
<#if cannotcreate?? && cannotcreate>
<div class="row" style="margin-top: 50px;">
	<div class="col-md-8 col-md-offset-2">
		<div class="alert alert-danger" role="alert">
			<strong>错误！</strong>
			您无法创建${'『'+ownCompany+'』的'}招标信息！
		</div>
	</div>
</div>
<#else>
<div class="navbar navbar-default navbar-fixed-top padding-0 margin-0">
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#suredy-form-navbar">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<span class="navbar-brand">
				<i class="icon-paste icon-large"></i>
				新的投标
			</span>
		</div>
		<div class="collapse navbar-collapse" id="suredy-form-navbar">
			<ul class="nav navbar-nav suredy-form-bar">
				<li>
					<a href="javascript:void(0);" class="submit-bid-info">
						<i class="icon-ok icon-large"></i>
						新建
					</a>
				</li>
				<li>
					<a href="javascript:void(0);" class="reset-form-info">
						<i class="icon-undo icon-large"></i>
						重置表单
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>

<div class="container" style="padding-top: 60px;">
	<form class="form-bid-create" action="${request.contextPath}/bid/create" method="post" enctype="multipart/form-data">
		<div class="panel panel-primary">
			<div class="panel-heading">
				<h3 class="panel-title">招标信息</h3>
			</div>
			<div class="panel-body" style="padding-bottom: 0;">
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										投标单位
									</div>
								</div>
								<input type="text" class="form-control not-empty" name="ownCompany" value="${ownCompany}" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										项目名称
									</div>
								</div>
								<input type="text" class="form-control not-empty" name="name" placeholder="最多100个汉字">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										投标编号
									</div>
								</div>
								<input type="text" class="form-control not-empty" name="projectNo" placeholder="最多50个字符">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										投标类型
									</div>
								</div>
								<select class="form-control not-empty" name="bidType">
									<#if bidTypes??> <#list bidTypes as bts>
									<option value="${bts}">${bts}</option>
									</#list> </#if>
								</select>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">授权代理人</div>
								</div>
								<input type="text" class="form-control" name="executor" placeholder="最多10个汉字">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										招标编号
									</div>
								</div>
								<input type="text" class="form-control not-empty" name="bidNo" placeholder="最多50个字符">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										报价方式
									</div>
								</div>
								<select class="form-control not-empty" name="quotationType">
									<#if bidQuotationType??> <#list bidQuotationType as bqt>
									<option value="${bqt}">${bqt}</option>
									</#list> </#if>
								</select>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										招标方式
									</div>
								</div>
								<select class="form-control not-empty" name="bidWay">
									<#if bidWays??> <#list bidWays as bws>
									<option value="${bws}">${bws}</option>
									</#list> </#if>
								</select>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										报名时间
									</div>
								</div>
								<input type="text" class="form-control not-empty datetimepicker" data-foot="false" data-format="yyyy-MM-dd" name="signDate" placeholder="请选择日期" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										开标时间
									</div>
								</div>
								<input type="text" class="form-control not-empty datetimepicker" data-format="yyyy-MM-dd HH:mm" name="openingTime" placeholder="请选择日期时间" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										招标范围
									</div>
								</div>
								<textarea rows="3" class="form-control not-empty" name="bidScope" placeholder="最多1000个汉字"></textarea>
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">备注</div>
								</div>
								<textarea rows="3" class="form-control" name="remark" placeholder="最多1000个汉字"></textarea>
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										招标文件
									</div>
								</div>
								<input type="file" name="serviceFile" class="hidden" data-suffix=".pdf, .jpeg, .jpg">
								<input type="text" class="form-control not-empty file-show" placeholder="请选择招标文件。格式只能是[.pdf, .jpeg, .jpg]中的一个！" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">附件资料</div>
								</div>
								<input type="file" name="file" class="hidden" data-suffix=".rar, .zip">
								<input type="text" class="form-control file-show" placeholder="请选择附件资料。格式只能是[.rar, .zip]中的一个！" readonly="readonly">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="panel panel-info">
			<div class="panel-heading">
				<h3 class="panel-title">费用信息</h3>
			</div>
			<div class="panel-body" style="padding-bottom: 0;">
				<div class="row">
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										购买标书
									</div>
								</div>
								<input type="hidden" name="money[0].payOut" value="true">
								<input type="hidden" name="money[0].inAccount" value="true">
								<input type="hidden" name="money[0].name" value="购买标书">
								<input class="money-source" type="hidden" name="money[0].source" value="招投标公司">
								<input type="hidden" name="money[0].invoice" value="true">
								<input type="text" class="form-control not-empty number" name="money[0].total" placeholder="填写金额">
								<div class="input-group-addon">元</div>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										支出日期
									</div>
								</div>
								<input type="text" class="form-control not-empty datetimepicker" name="money[0].time" data-time="${.now}" data-format="yyyy-MM-dd" data-foot="false" placeholder="请选择日期" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-4"></div>
				</div>
				<div class="row">
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										投标保证金
									</div>
								</div>
								<input type="hidden" name="money[1].payOut" value="true">
								<input type="hidden" name="money[1].gaveBack" value="false">
								<input type="hidden" name="money[1].inAccount" value="true">
								<input type="hidden" name="money[1].name" value="投标保证金">
								<input class="money-source" type="hidden" name="money[1].source" value="招投标公司">
								<input type="hidden" name="money[1].invoice" value="false">
								<input type="text" class="form-control not-empty number" name="money[1].total" placeholder="填写金额">
								<div class="input-group-addon">元</div>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										支出日期
									</div>
								</div>
								<input type="text" class="form-control not-empty datetimepicker" name="money[1].time" data-time="${.now}" data-format="yyyy-MM-dd" data-foot="false" placeholder="请选择日期" readonly="readonly">
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										回收日期
									</div>
								</div>
								<input type="text" class="form-control not-empty datetimepicker" name="money[1].backTime" data-time="${.now}" data-format="yyyy-MM-dd" data-foot="false" placeholder="请选择日期" readonly="readonly">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="panel panel-danger">
			<div class="panel-heading">
				<h3 class="panel-title">
					招标单位信息
					<div class="btn btn-xs btn-danger bidding-create pull-right" style="margin-top: -2px;">
						<i class="icon-plus"></i>
						新招标单位
					</div>
				</h3>
			</div>
			<div class="panel-body" style="padding-bottom: 0;">
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										招标单位
									</div>
								</div>
								<select class="form-control not-empty" name="biddingerInfo.biddinger.id">
									<#if biddingers??> <#list biddingers as bs>
									<option value="${bs.id}">${bs.company}</option>
									</#list> </#if>
								</select>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">联系人</div>
								</div>
								<input type="text" class="form-control" name="biddingerInfo.contact" placeholder="最多10个汉字">
							</div>
						</div>
					</div>
					<div class="col-md-8">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">电话</div>
								</div>
								<input type="text" class="form-control" name="biddingerInfo.phone" placeholder="最多20个数字">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="panel panel-success">
			<div class="panel-heading">
				<h3 class="panel-title">
					招标代理机构信息
					<div class="btn btn-xs btn-success agency-create pull-right" style="margin-top: -2px;">
						<i class="icon-plus"></i>
						新代理机构
					</div>
				</h3>
			</div>
			<div class="panel-body" style="padding-bottom: 0;">
				<div class="row">
					<div class="col-md-12">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">
										<span class="not-null-star">*</span>
										代理机构
									</div>
								</div>
								<select class="form-control not-empty" name="bidAgencyInfo.agency.id">
									<#if bidAgencys??> <#list bidAgencys as bas>
									<option value="${bas.id}">${bas.company}</option>
									</#list> </#if>
								</select>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">联系人</div>
								</div>
								<input type="text" class="form-control" name="bidAgencyInfo.contact" placeholder="最多10个汉字">
							</div>
						</div>
					</div>
					<div class="col-md-8">
						<div class="form-group">
							<div class="input-group">
								<div class="input-group-addon">
									<div class="form-item-title">电话</div>
								</div>
								<input type="text" class="form-control" name="bidAgencyInfo.phone" placeholder="最多20个数字">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
</div>
</#if>
<!--  -->
</@t.body> <@t.foot>
<script src="${request.contextPath}/core/js/jquery.form.js"></script>
<script src="${request.contextPath}/js/suredy-modal.js"></script>
<script src="${request.contextPath}/js/suredy-datetimepicker.js"></script>
<script src="${request.contextPath}/app/js/file.js"></script>
<script src="${request.contextPath}/app/js/form-checker.js"></script>
<script src="${request.contextPath}/app/bid/js/bid-create.js"></script>
</@t.foot>
